#ifndef TEXTURE_H
#define TEXTURE_H

#include "../Config/Export.h"
#include "../Core/IResource.h"
#include "../Maths/TVector2.h"
#include "GL/glew.h"

#define TEXTURE_REVERT_X 10
#define TEXTURE_REVERT_Y 20
#define TEXTURE_REVERT_XY 30

namespace epix {

class SHARED Texture : public IResource
{
    public:

        Texture(GLuint texID, Vector2i size, int channels, unsigned char *data, const char *name);
        Texture(Vector2i size, unsigned char *data, const char *name);
        ~Texture();

        GLuint getGLID() const;
        const Vector2i &getSize() const;
        int getChannels() const;
        unsigned char *getData() const;
        
        void save(const char *filename);

    private:
    
		Texture(const Texture &);
		Texture &operator=(const Texture &);

        GLuint _texID;
        Vector2i _size;
        int _channels;
        unsigned char *_data;

};

}

#endif

